package com.education.db.domain;

import javax.persistence.*;

/**
 * Created by Fan on 2016/9/26.
 */
@Entity
@Table(name = "info_major", schema = "db_education", catalog = "")
public class InfoMajor {
    private int maId;
    private String maValue;
    private String maName;

    @Id
    @Column(name = "ma_id")
    public int getMaId() {
        return maId;
    }

    public void setMaId(int maId) {
        this.maId = maId;
    }

    @Basic
    @Column(name = "ma_value")
    public String getMaValue() {
        return maValue;
    }

    public void setMaValue(String maValue) {
        this.maValue = maValue;
    }

    @Basic
    @Column(name = "ma_name")
    public String getMaName() {
        return maName;
    }

    public void setMaName(String maName) {
        this.maName = maName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InfoMajor infoMajor = (InfoMajor) o;

        if (maId != infoMajor.maId) return false;
        if (maValue != null ? !maValue.equals(infoMajor.maValue) : infoMajor.maValue != null) return false;
        if (maName != null ? !maName.equals(infoMajor.maName) : infoMajor.maName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = maId;
        result = 31 * result + (maValue != null ? maValue.hashCode() : 0);
        result = 31 * result + (maName != null ? maName.hashCode() : 0);
        return result;
    }
}
